package com.huawei.appgallery.search.ui.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.search.ui.card.HistoryToggleCard;
import o.azb;
import o.cdr;
import o.chy;
import o.cih;
import o.cuv.e;

public class HistoryToggleNode extends cdr {
    public HistoryToggleNode(Context context) {
        super(context, 1);
    }

    public int ˏ() {
        return 1;
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        View inflate = LayoutInflater.from(this.ॱ).inflate(e.ʼ, null);
        azb.ˏ(inflate);
        cih historyToggleCard = new HistoryToggleCard(this.ॱ);
        historyToggleCard.ˏ(inflate);
        ˊ(historyToggleCard);
        viewGroup.addView(inflate, layoutParams);
        return true;
    }

    public void ˋ(chy o_chy) {
        super.ˋ(o_chy);
        int i = 0;
        while (i < ˊॱ() && (ˎ(i) instanceof HistoryToggleCard)) {
            HistoryToggleCard historyToggleCard = (HistoryToggleCard) ˎ(i);
            if (historyToggleCard != null) {
                historyToggleCard.ॱ(o_chy);
            }
            i++;
        }
    }
}
